package com.ruoyi.res_banner.service.impl;

        import com.ruoyi.res_banner.domain.Res_Banner;
        import com.ruoyi.res_banner.mapper.Res_BannerMapper;
        import com.ruoyi.res_banner.service.Res_BannerService;
        import org.springframework.beans.factory.annotation.Autowired;
        import org.springframework.stereotype.Service;

        import java.util.List;
@Service
public class Res_BannerServiceImpl implements Res_BannerService {
    @Autowired
    private Res_BannerMapper mapper;
    //    service 是接口，并没有真的实现方法
//    serviceImpl 实现了接口，因此需要在serviceImpl 里面来写真正的方法体
    @Override
    public List<Res_Banner> getRes_BannerList() {
        return mapper.queryAll();
    }

    @Override
    public int addRes_Banner(Res_Banner res_banner) {
        return mapper.addRes_Banner(res_banner);
    }

    @Override
    public void updateRes_Banner(Res_Banner res_banner) {
        mapper.updateRes_Banner(res_banner);
    }

    @Override
    public void deleteRes_Banner(int id) {
        mapper.deleteRes_Banner(id);
    }
    @Override
    public List<Res_Banner> queryRes_BannerByTitle(String title) {
        return mapper.queryRes_BannerByTitle(title);
    }
}
